package cn.exrick.xboot.base.entity

import cn.exrick.xboot.core.base.XbootBaseEntityKt
import cn.exrick.xboot.core.common.utils.SnowFlakeUtil
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

/**
 * @author Fei
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "su_supervison_user")
@TableName("su_supervison_user")
@ApiModel(value = "监管部门用户")
data class SupervisionUser(

        @ApiModelProperty(value = "用户id")
        var userId: String? = null,

        @ApiModelProperty("所属科室")
        var officeId: String? = null,

        @ApiModelProperty("区域id")
        var areaId: String? = null,

        @ApiModelProperty("行业id")
        var businessId: String? = null,

        @ApiModelProperty("所属职务")
        var dutyId: String? = null,

        @ApiModelProperty("监管部门等级")
        var userLevel: Int? = null


) : XbootBaseEntityKt() {

    @Id
    @TableId
    override var id: String = SnowFlakeUtil.nextId().toString()

    companion object {
        private const val serialVersionUID = 1L
    }
}